define(['durandal/system','durandal/app', 'jquery', 'knockout', './noticeExamples'],function(system, app, $, ko, noticeExamples) {
    var notice = ko.observable();
    var examples = ko.observableArray(noticeExamples);

    function send() {
        var dataToSend = {
            name: "",
            type: "normal",
            sender: "",
            content:!!notice() ? notice() : ""
        };
        app.showMessage("Json send to Server: " + JSON.stringify(dataToSend),"你的动态");
        examples.push(dataToSend);
    }

    return {
        notice: notice,
        send: send,
        examples: examples
    }
});